Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docs for check_and_build_global_config() #270

Merged
merged 5 commits into from
Dec 25, 2024

Conversation

yucongalicechen
Copy link
Contributor

closes #268
@sbillinge ready for review

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.68%. Comparing base (d791c63) to head (13742d0).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #270   +/-   ##
=======================================
  Coverage   98.68%   98.68%           
=======================================
  Files           8        8           
  Lines         379      379           
=======================================
  Hits          374      374           
  Misses          5        5           



def stringify(obj):
def _stringify(obj):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this function private and remove unncessary functions

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautifully done. Just a couple of suggestions in line

doc/source/examples/tools_example.rst Outdated Show resolved Hide resolved
Please enter your orcid ID if you know it: 0000-0000-0000-0000


After receiving the inputs, the function will write the following to the file:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe ".... the diffpyconfig.json file in the users home directory"?

On the one hand it is a bit repetitive (also did elsewhere), but maybe it is better to be clear?

doc/source/utilities/tools_utility.rst Outdated Show resolved Hide resolved
Developers can use this function to simplify the process of loading, merging, and saving information consistently and easily.
Additionally, it saves the effort of re-entering information, and allows overriding current information by
passing parameters.

- ``check_and_build_global_config()``: This function helps create a global configuration file
that can be used by ``get_user_info()``.
If no existing configuration file is found, and the user allows inputs, this function prompts for information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "user allows inputs" is confusing so I recommend to delete that.

@yucongalicechen
Copy link
Contributor Author

@sbillinge ready for review!

@sbillinge sbillinge merged commit bd1b346 into diffpy:main Dec 25, 2024
5 checks passed
@yucongalicechen yucongalicechen deleted the user-info2 branch December 26, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix typo, remove unncessary functions, and add example for update_config_workflow
2 participants